﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IPagination<FileAttribute>>" %>
<%@ Import Namespace="WROA.WEB.Models" %>
<%@ Import Namespace="MvcContrib.UI.Grid" %>
<%@ Import Namespace="MvcContrib.UI.Pager"%>
<%@ Import Namespace="MvcContrib.Pagination"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ChangeWord</title>
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="../../Content/Main.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Js/Alter.js" type="text/javascript"></script>
    <script src="../../Scripts/Js/Main.js" type="text/javascript"></script>
</head>
<body>

    檔案:
   <% using (Html.BeginForm("Upload", "Shared", FormMethod.Post, new { enctype = "multipart/form-data" }))
      {%> 
    <input type="file" name="Uploadfile" /> 
    <input type ="submit"  name ="Upload" value ="上傳" /> 
    <%} %>

    <div>
        <% =Html.Grid(Model).Columns(column =>
           {
               column.For(x => x.id).Named("资源编号");
               column.For(x => x.Path).Named("资源名称");
               column.For(x => x.Size).Named("上传日期").Format("{0:yyyy.MM.dd}");
               column.For(x => x.Name).Named("所属的课程");
               column.For(x => x.Name).Named("状态");
               column.For(x => Html.ActionLink("详细信息", null, new { Id = x.id }, new { @class = "det", href = "#" })).DoNotEncode();
               column.For(x => Html.ActionLink("下载", "DownLoad", new { Id = x.Name })).DoNotEncode();
               column.For(x => Html.ActionLink("编辑", "Edit", new { id = x.id })).DoNotEncode();
               column.For(x => Html.ActionLink("删除", "Delete", new { id = x.id }, new { onclick = "javascript:return IsDelete();" })).DoNotEncode();
           }).Empty("对不起,没有找到任何数据!!")%>
           <br />
   <%=Html.Pager(Model).First("首页").Last("末页").Previous("上一页").Next("下一页").Format("  共 {2} 条记录  ")%>
    </div>
</body>
</html>
